options ls = 100 ps = 80 probsig=2;

data fuzzy1;  informat code $25.;informat bcode $20.;
   infile 'c:/My Documents/data/scAT.4/a/SDoneIAT_exp4a.dat' delimiter='09'x;
   input date    time  $  build  sub   code    $   block   trial  lat     resp  $  corr  trialitm    bcode $;exp = 1;
data fuzzy2;  informat code $25.;informat bcode $20.;
   infile 'c:/My Documents/data/scAT.4/a/SDoneIAT_exp4b.dat' delimiter='09'x;
   input date    time  $  build  sub   code    $   block   trial  lat     resp  $  corr  trialitm    bcode $;exp = 2;
data fuzzy3;  informat code $25.;informat bcode $20.;
   infile 'c:/My Documents/data/scAT.4/a/SDoneIAT_exp4c.dat' delimiter='09'x;
   input date    time  $  build  sub   code    $   block   trial  lat     resp  $  corr  trialitm    bcode $;exp = 3;
data fuzzy4;  informat code $25.;informat bcode $20.;
   infile 'c:/My Documents/data/scAT.4/B/SDoneIAT_exp4a.dat' delimiter='09'x;
   input date    time  $  build  sub   code    $   block   trial  lat     resp  $  corr  trialitm    bcode $;exp = 1;
data fuzzy5;  informat code $25.;informat bcode $20.;
   infile 'c:/My Documents/data/scAT.4/B/SDoneIAT_exp4b.dat' delimiter='09'x;
   input date    time  $  build  sub   code    $   block   trial  lat     resp  $  corr  trialitm    bcode $;exp = 2;
data fuzzy6;  informat code $25.;informat bcode $20.;
   infile 'c:/My Documents/data/scAT.4/B/SDoneIAT_exp4c.dat' delimiter='09'x;
   input date    time  $  build  sub   code    $   block   trial  lat     resp  $  corr  trialitm    bcode $;exp = 3;
data fuzzy7;  informat code $25.;informat bcode $20.;
   infile 'c:/My Documents/data/scAT.4/E/SDoneIAT_exp4a.dat' delimiter='09'x;
   input date    time  $  build  sub   code    $   block   trial  lat     resp  $  corr  trialitm    bcode $;exp = 1;
data fuzzy8;  informat code $25.;informat bcode $20.;
   infile 'c:/My Documents/data/scAT.4/F/SDoneIAT_exp4b.dat' delimiter='09'x;
   input date    time  $  build  sub   code    $   block   trial  lat     resp  $  corr  trialitm    bcode $;exp = 2;
data fuzzy9;  informat code $25.;informat bcode $20.;
   infile 'c:/My Documents/data/scAT.4/E/SDoneIAT_exp4c.dat' delimiter='09'x;
   input date    time  $  build  sub   code    $   block   trial  lat     resp  $  corr  trialitm    bcode $;exp = 3;
data fuzzy10;  informat code $25.;informat bcode $20.;
   infile 'c:/My Documents/data/scAT.4/F/SDoneIAT_exp4a.dat' delimiter='09'x;
   input date    time  $  build  sub   code    $   block   trial  lat     resp  $  corr  trialitm    bcode $;exp = 1;
data fuzzy11;  informat code $25.;informat bcode $20.;
   infile 'c:/My Documents/data/scAT.4/G/SDoneIAT_exp4a.dat' delimiter='09'x;
   input date    time  $  build  sub   code    $   block   trial  lat     resp  $  corr  trialitm    bcode $;exp = 1;
data fuzzy12;  informat code $25.;informat bcode $20.;
   infile 'c:/My Documents/data/scAT.4/G/SDoneIAT_exp4b.dat' delimiter='09'x;
   input date    time  $  build  sub   code    $   block   trial  lat     resp  $  corr  trialitm    bcode $;exp = 2;
data fuzzy13;  informat code $25.;informat bcode $20.;
   infile 'c:/My Documents/data/scAT.4/f/SDoneIAT_exp4c.dat' delimiter='09'x;
   input date    time  $  build  sub   code    $   block   trial  lat     resp  $  corr  trialitm    bcode $;exp = 3;
data fuzzy14;  informat code $25.;informat bcode $20.;
   infile 'c:/My Documents/data/scAT.4/c/SDoneIAT_exp4a.dat' delimiter='09'x;
   input date    time  $  build  sub   code    $   block   trial  lat     resp  $  corr  trialitm    bcode $;exp = 1;
data fuzzy15;  informat code $25.;informat bcode $20.;
   infile 'c:/My Documents/data/scAT.4/c/SDoneIAT_exp4b.dat' delimiter='09'x;
   input date    time  $  build  sub   code    $   block   trial  lat     resp  $  corr  trialitm    bcode $;exp = 2;
data fuzzy16;  informat code $25.;informat bcode $20.;
   infile 'c:/My Documents/data/scAT.4/c/SDoneIAT_exp4c.dat' delimiter='09'x;
   input date    time  $  build  sub   code    $   block   trial  lat     resp  $  corr  trialitm    bcode $;exp = 3;
data temp;
  set fuzzy1 fuzzy2 fuzzy3 fuzzy5 fuzzy6 fuzzy7 fuzzy8 fuzzy9 fuzzy10 fuzzy11 fuzzy12 fuzzy13 fuzzy14 fuzzy15 fuzzy16;

if block in (1,2) then delete;if trial < 19 then delete;if bcode = 'bcode' then delete;
if sub = 2017 then exp = 2; if sub = 2001 then delete;

if code in ( 'bugs_false750', 'fruit_false750', 'good_false750', 'bad_false750',
             'bugbackground_false750', 'fruitbackground_false750',
             'bugs_false666', 'fruit_false666', 'good_false666', 'bad_false666',
             'bugbackground_false666', 'fruitbackground_false666',
             'bugs_false550', 'fruit_false550', 'good_false550', 'bad_false550',
             'bugbackground_false550', 'fruitbackground_false550')
then item = 0;else item = 1;
if corr = 0 and item = 0 then response = 'corrrej';
if corr = 0 and item = 1 then response = 'miss';
if corr = 1 and item = 0 then response = 'falsalr';
if corr = 1 and item = 1 then response = 'hit';

/*proc means n mean std; class exp code response; var lat; run; */

proc sort; by sub exp bcode response; run;
proc means noprint data=temp n; by sub exp bcode response; var lat;
  output out=means  mean=speed; run;
proc transpose data=means prefix=speed name=name out=spdmeans;
  by sub exp bcode response;run;
proc sort; by name; run;
data prac;  set spdmeans; if name ^= '_FREQ_' then delete;
   /*if speed1 < 0 then speed1 = 0;*/
   if response = 'corrrej' then do;
      if speed1 = 18 then do; response = 'falsalr'; speed1 = 0.4; end;
      else delete; end;
   if response = 'miss' then do;
      if speed1 = 24 then do; response = 'hit'; speed1 = 0.4; end;
      else delete; end;
   if response = 'hit' and speed1 = 24 then speed1 = 23.6;
   if response = 'falsalr' and speed1 = 18 then speed1 = 17.6;
proc sort; by sub exp;
proc transpose data=prac prefix=freq name=name out=freq; by sub exp; run;
proc sort; by name; run;
data prac; set freq;
   Fbgbd55 = probit(freq1/18); Hbgbd55 = probit(freq2/24);
   Fbgbd66 = probit(freq3/18); Hbgbd66 = probit(freq4/24);
   Fbgbd75 = probit(freq5/18); Hbgbd75 = probit(freq6/24);
   Fbggd55 = probit(freq7/18); Hbggd55 = probit(freq8/24);
   Fbggd66 = probit(freq9/18); Hbggd66 = probit(freq10/24);
   Fbggd75 = probit(freq11/18); Hbggd75 = probit(freq12/24);
   Fftbd55 = probit(freq13/18); Hftbd55 = probit(freq14/24);
   Fftbd66 = probit(freq15/18); Hftbd66 = probit(freq16/24);
   Fftbd75 = probit(freq17/18); Hftbd75 = probit(freq18/24);
   Fftgd55 = probit(freq19/18); Hftgd55 = probit(freq20/24);
   Fftgd66 = probit(freq21/18); Hftgd66 = probit(freq22/24);
   Fftgd75 = probit(freq23/18); Hftgd75 = probit(freq24/24);
   bDbgbd55 = Hbgbd55 - Fbgbd55; bDbggd55 = Hbggd55 - Fbggd55;
   bDftbd55 = Hftbd55 - Fftbd55; bDftgd55 = Hftgd55 - Fftgd55;
   bDbgbd66 = Hbgbd66 - Fbgbd66; bDbggd66 = Hbggd66 - Fbggd66;
   bDftbd66 = Hftbd66 - Fftbd66; bDftgd66 = Hftgd66 - Fftgd66;
   bDbgbd75 = Hbgbd75 - Fbgbd75; bDbggd75 = Hbggd75 - Fbggd75;
   bDftbd75 = Hftbd75 - Fftbd75; bDftgd75 = Hftgd75 - Fftgd75;
   DbugAt55 = Dbggd55-Dbgbd55;DbugAt66 = Dbggd66-Dbgbd66;DbugAt75 = Dbggd75-Dbgbd75;
   DfrtAt55 = Dftgd55-Dftbd55;DfrtAt66 = Dftgd66-Dftbd66;DfrtAt75 = Dftgd75-Dftbd75;
   if mod(sub,2) = 1 then order = 1; else order = 0;

   BFbgbdal = probit((freq1+freq3+freq5)/54);  BHbgbdal = probit((freq2+freq4+freq6)/72);
   BFbggdal = probit((freq7+freq9+freq11)/54);  BHbggdal = probit((freq8+freq10+freq12)/72);
   BFftbdal = probit((freq13+freq15+freq17)/54); BHftbdal = probit((freq14+freq16+freq18)/72);
   BFftgdal = probit((freq19+freq21+freq23)/54); BHftgdal = probit((freq20+freq22+freq24)/72);
   bDbgbdal = bHbgbdal - bFbgbdal;   bDbggdal = bHbggdal - bFbggdal;
   bDftbdal = bHftbdal - bFftbdal;   bDftgdal = bHftgdal - bFftgdal;
   bFruitAl = bDftgdal - bDftbdal;   bBugsAl = bDbggdal - bDbgbdal;

   bZbgbd55 = probit(1 - freq1/18);  bZbgbd66 = probit(1 - freq3/18);
   bZbggd55 = probit(1 - freq7/18);  bZbggd66 = probit(1 - freq9/18);
   bZftbd55 = probit(1 - freq13/18); bZftbd66 = probit(1 - freq15/18);
   bZftgd55 = probit(1 - freq19/18); bZftgd66 = probit(1 - freq21/18);
   bZbgbd75 = probit(1 - freq5/18);  bZbggd75 = probit(1 - freq11/18);
   bZftbd75 = probit(1 - freq17/18); bZftgd75 = probit(1 - freq23/18);

   bZbgbdAl = probit(1 - ((freq1+freq3+freq5)/54)); bZbggdal = probit(1 - ((freq7+freq9+freq11)/54));
   bZftbdal = probit(1 - ((freq13+freq15+freq17)/54)); bZftgdal = probit(1 - ((freq19+freq21+freq23)/54));

   bBbgbd55 = probnorm(bZbgbd55 - bDbgbd55)/probnorm(bZbgbd55);
   bBbgbd66 = probnorm(bZbgbd66 - bDbgbd66)/probnorm(bZbgbd66);
   bBbggd55 = probnorm(bZbggd55 - bDbggd55)/probnorm(bZbggd55);
   bBbggd66 = probnorm(bZbggd66 - bDbggd66)/probnorm(bZbggd66);
   bBftbd55 = probnorm(bZftbd55 - bDftbd55)/probnorm(bZftbd55);
   bBftbd66 = probnorm(bZftbd66 - bDftbd66)/probnorm(bZftbd66);
   bBftgd55 = probnorm(bZftgd55 - bDftgd55)/probnorm(bZftgd55);
   bBftgd66 = probnorm(bZftgd66 - bDftgd66)/probnorm(bZftgd66);
   bBbgbd75 = probnorm(bZbgbd75 - bDbgbd75)/probnorm(bZbgbd75);
   bBbggd75 = probnorm(bZbggd75 - bDbggd75)/probnorm(bZbggd75);
   bBftbd75 = probnorm(bZftbd75 - bDftbd75)/probnorm(bZftbd75);
   bBftgd75 = probnorm(bZftgd75 - bDftgd75)/probnorm(bZftgd75);

   bBbgbdal = probnorm(bZbgbdal - bDbgbdal)/probnorm(bZbgbdal);
   bBbggdal = probnorm(bZbggdal - bDbggdal)/probnorm(bZbggdal);
   bBftbdal = probnorm(bZftbdal - bDftbdal)/probnorm(bZftbdal);
   bBftgdal = probnorm(bZftgdal - bDftgdal)/probnorm(bZftgdal);

proc sort data=prac; by sub; run;
data explicit;
  informat major $25.; informat dept $25.; informat Afavrte $25.;informat ethnicit $25.;
  infile 'c:/My Documents/data/math.undergrad.2/math.ugrad.txt' delimiter='09'x;
  input #1 sub Amath Apsych Aengr Aarts Abiology Areading Ascience Aenglish
            Aphysics Aphil AR1 $ AR2 $ AR3 $ AR4 $ AR5 $ AR6 $ AR7 $ AR8 $ AR9 $ AR10 $
            Afavrte $ imath ipsych iengr iarts ibiology ireading iscience ienglish
            iphysics iphil iR1 $ iR2 $ iR3 $ iR4 $ iR5 $ iR6 $ iR7 $ iR8 $ iR9 $ iR10 $
            ifavrte $
        #2  BSRI1 BSRI2 BSRI3 BSRI4 BSRI5 BSRI6 BSRI7 BSRI8 BSRI9 BSRI10
            BSRI11 BSRI12 BSRI13 BSRI14 BSRI15 BSRI16 BSRI17 BSRI18 BSRI19 BSRI20
            BSRI21 BSRI22 BSRI23 BSRI24 BSRI25 BSRI26 BSRI27 BSRI28 BSRI29 BSRI30
            BSRI31 BSRI32 BSRI33 BSRI34 BSRI35 BSRI36 BSRI37 BSRI38 BSRI39 BSRI40
            BSRI41 BSRI42 BSRI43 BSRI44 BSRI45 BSRI46 BSRI47 BSRI48 BSRI49 BSRI50
            BSRI51 BSRI52 BSRI53 BSRI54 BSRI55 BSRI56 BSRI57 BSRI58 BSRI59 BSRI60
            GID1 GID2 GID3 GID4 GID5 GID6 GID7 GID8 GID9 GID10 GID11 GID12 GID13 GID14
        #3  carid1 carid2 carid3 carid4 carid5 carid6 carid7 carid8 carid9 carid10
            carid11 carid12 carid13
            IMPgendr IMPage IMPrace IMPses
            bugtemp anmltemp fruttemp foodtemp relfruit relbugs bugfruit
            year dept $ maj $ major age sex $ ethnicit $ bornUS UShwlng Engfirst Enghwlng
            glasses handed $ sleep alert computer SATmath SATverb;

proc sort data=explicit;by sub;run;
data comb;merge prac (in=frog) explicit;by sub;if frog;run;
data comb; set comb;
  GID2 = 8-GID2; GID4 = 8-GID4; GID5 = 8-GID5; GID7 = 8-GID7; GID9 = 8-GID9; GID11 = 8-GID11;
  GID13 = 8-GID13;
  EsexID = mean (of GID1 GID2 GID4 GID5 GID6 GID8 GID9 GID11 GID12 GID14);
  EothsxID = mean (of GID3 GID7 GID10 GID13);
  careerID = mean (of carid1 carid2 carid4 carid6 carid7 carid9);
  Estereo = mean (of carid3 carid5 carid8 carid10);
  Gendiff = carid11; GenAfct = carid12; Effort = carid13;
  masculin = mean (of BSRI1 BSRI4 BSRI7 BSRI10
            BSRI13 BSRI16 BSRI19 BSRI22 BSRI25 BSRI28 BSRI31 BSRI34 BSRI37 BSRI40
            BSRI43 BSRI46 BSRI49 BSRI52 BSRI55 BSRI58);
  feminine = mean (of BSRI2 BSRI5 BSRI8 BSRI11 BSRI14 BSRI17 BSRI20
            BSRI23 BSRI26 BSRI29 BSRI32 BSRI35 BSRI38 BSRI41 BSRI44 BSRI47 BSRI50
            BSRI53 BSRI56 BSRI59);
  neutral  = mean (of BSRI3 BSRI6 BSRI9 BSRI12 BSRI15 BSRI18 BSRI21 BSRI24 BSRI27 BSRI30
            BSRI33 BSRI36 BSRI39 BSRI42 BSRI45 BSRI48 BSRI51 BSRI54 BSRI57 BSRI60);
  GID2 = -GID2; GID4 = -GID4; GID5 = -GID5; GID7 = -GID7; GID9 = -GID9;
  GID11 = -GID11; GID13 = -GID13; EgenID = mean(GID1 - GID14);
  Amthread = Amath - Areading; Amtharts = Amath - Aarts;
  Imthread = Imath - Ireading; Imtharts = Imath - Iarts;
  SATperf = SATmath - SATverb;
  if major in (1,2) then majorcat = 1;else if major in (3,4) then majorcat = 2;
  AnmlTmpD = bugtemp - anmltemp;  FoodTmpD = fruttemp - foodtemp;
  if sub in (2014,2025) then do;dBGBD55 = .;dBGGD55 = .;end;
  if sub = 2018 then do;dFTGD55 = .;dFTBD55 = .;end; if sub = 2020 then do;dFTBD66 = .;dFTGD66 = .;end;
  if sub in (2014,2025,2018,2020) then delete;

/*overall analysis*/
proc means; class exp; var bDbgbdal bdbggdal bdftbdal bdftgdal;run;
proc glm; class exp;model bDbgbdal bdbggdal bdftbdal bdftgdal = exp /nouni;
          repeated bugfruit 2, badgood 2;run;
proc glm; model bDbgbdal bdbggdal = /nouni; repeated badgood 2;where exp = 1;title 'bugs only-standard';run;
proc glm; model bDbgbdal bDbggdal = /nouni; repeated badgood 2;where exp = 2;title 'bugs only-superord';run;
proc glm; model bDbgbdal bDbggdal = /nouni; repeated badgood 2;where exp = 3;title 'bugs only-noback';run;
proc glm; model bDftbdal bDftgdal = /nouni;repeated badgood 2;where exp = 1;title 'fruit only-standard';run;
proc glm; model bDftbdal bDftgdal = /nouni;repeated badgood 2;where exp = 2;title 'fruit only-superord';run;
proc glm; model bDftbdal bDftgdal = /nouni;repeated badgood 2;where exp = 3;title 'fruit only-noback';run;

proc glm; class exp; model BDbgbd55 BDbggd55 BDftbd55 BDftgd55 BDbgbd66 BDbggd66 BDftbd66 BDftgd66
                BDbgbd75 BDbggd75 BDftbd75 BDftgd75 = exp /nouni;
          repeated window 3, bugfruit 2, badgood 2;run;

/*sensitivity*/
proc means;
  class exp;
  var bDbgbd55 bDbggd55 bDftbd55 bDftgd55 bDbgbd66 bDbggd66 bDftbd66 bDftgd66 bDbgbd75 bDbggd75 bDftbd75 bDftgd75;run;

proc glm; model bDbgbd55 bDbggd55 = /nouni;repeated badgood 2;where exp = 1;title '1 bugs only';run;
proc glm; model bDbgbd66 bDbggd66 = /nouni;repeated badgood 2;where exp = 1;title '1 bugs only';run;
proc glm; model bDbgbd75 bDbggd75 = /nouni;repeated badgood 2;where exp = 1;title '1 bugs only';run;
proc glm; model bDftbd55 bDftgd55 = /nouni;repeated badgood 2;where exp = 1;title '1 fruit only';run;
proc glm; model bDftbd66 bDftgd66 = /nouni;repeated badgood 2;where exp = 1;title '1 fruit only';run;
proc glm; model bDftbd75 bDftgd75 = /nouni;repeated badgood 2;where exp = 1;title '1 fruit only';run;

proc glm; model bDbgbd55 bDbggd55 = /nouni;repeated badgood 2;where exp = 2;title '2 bugs only';run;
proc glm; model bDbgbd66 bDbggd66 = /nouni;repeated badgood 2;where exp = 2;title '2 bugs only';run;
proc glm; model bDbgbd75 bDbggd75 = /nouni;repeated badgood 2;where exp = 2;title '2 bugs only';run;
proc glm; model bDftbd55 bDftgd55 = /nouni;repeated badgood 2;where exp = 2;title '2 fruit only';run;
proc glm; model bDftbd66 bDftgd66 = /nouni;repeated badgood 2;where exp = 2;title '2 fruit only';run;
proc glm; model bDftbd75 bDftgd75 = /nouni;repeated badgood 2;where exp = 2;title '2 fruit only';run;

proc glm; model bDbgbd55 bDbggd55 = /nouni;repeated badgood 2;where exp = 3;title '3 bugs only';run;
proc glm; model bDbgbd66 bDbggd66 = /nouni;repeated badgood 2;where exp = 3;title '3 bugs only';run;
proc glm; model bDbgbd75 bDbggd75 = /nouni;repeated badgood 2;where exp = 3;title '3 bugs only';run;
proc glm; model bDftbd55 bDftgd55 = /nouni;repeated badgood 2;where exp = 3;title '3 fruit only';run;
proc glm; model bDftbd66 bDftgd66 = /nouni;repeated badgood 2;where exp = 3;title '3 fruit only';run;
proc glm; model bDftbd75 bDftgd75 = /nouni;repeated badgood 2;where exp = 3;title '3 fruit only';run;

/*bias analysis*/
proc means; class exp;var bbbgbdal bbbggdal bbftbdal bbftgdal;run;
proc glm; class exp; model bbbgbdal bbbggdal bbftbdal bbftgdal = exp /nouni;
          repeated bugfruit 2, badgood 2;run;
proc glm; model bbbgbdal bbbggdal = /nouni; repeated badgood 2;where exp = 1;title 'bugs only-standard';run;
proc glm; model bbbgbdal bbbggdal = /nouni; repeated badgood 2;where exp = 2;title 'bugs only-superord';run;
proc glm; model bbbgbdal bbbggdal = /nouni; repeated badgood 2;where exp = 3;title 'bugs only-noback';run;
proc glm; model bbftbdal bbftgdal = /nouni;repeated badgood 2;where exp = 1;title 'fruit only-standard';run;
proc glm; model bbftbdal bbftgdal = /nouni;repeated badgood 2;where exp = 2;title 'fruit only-superord';run;
proc glm; model bbftbdal bbftgdal = /nouni;repeated badgood 2;where exp = 3;title 'fruit only-noback';run;

proc glm; class exp; model Bbbgbd55 Bbbggd55 Bbftbd55 Bbftgd55 Bbbgbd66 Bbbggd66 Bbftbd66 Bbftgd66
                Bbbgbd75 Bbbggd75 Bbftbd75 Bbftgd75 = exp /nouni;
          repeated window 3, bugfruit 2, badgood 2;run;

proc means;
  class exp; var bbbgbd55 bbbggd55 bbftbd55 bbftgd55
      Bbbgbd66 Bbbggd66 Bbftbd66 Bbftgd66 Bbbgbd75 Bbbggd75 Bbftbd75 Bbftgd75;run;

proc glm; model bbbgbd55 bbbggd55 = /nouni;repeated badgood 2;where exp = 1;title '1 bugs only';run;
proc glm; model bbbgbd66 bbbggd66 = /nouni;repeated badgood 2;where exp = 1;title '1 bugs only';run;
proc glm; model bbbgbd75 bbbggd75 = /nouni;repeated badgood 2;where exp = 1;title '1 bugs only';run;
proc glm; model bbftbd55 bbftgd55 = /nouni;repeated badgood 2;where exp = 1;title '1 fruit only';run;
proc glm; model bbftbd66 bbftgd66 = /nouni;repeated badgood 2;where exp = 1;title '1 fruit only';run;
proc glm; model bbftbd75 bbftgd75 = /nouni;repeated badgood 2;where exp = 1;title '1 fruit only';run;

proc glm; model bbbgbd55 bbbggd55 = /nouni;repeated badgood 2;where exp = 2;title '2 bugs only';run;
proc glm; model bbbgbd66 bbbggd66 = /nouni;repeated badgood 2;where exp = 2;title '2 bugs only';run;
proc glm; model bbbgbd75 bbbggd75 = /nouni;repeated badgood 2;where exp = 2;title '2 bugs only';run;
proc glm; model bbftbd55 bbftgd55 = /nouni;repeated badgood 2;where exp = 2;title '2 fruit only';run;
proc glm; model bbftbd66 bbftgd66 = /nouni;repeated badgood 2;where exp = 2;title '2 fruit only';run;
proc glm; model bbftbd75 bbftgd75 = /nouni;repeated badgood 2;where exp = 2;title '2 fruit only';run;

proc glm; model bbbgbd55 bbbggd55 = /nouni;repeated badgood 2;where exp = 3;title '3 bugs only';run;
proc glm; model bbbgbd66 bbbggd66 = /nouni;repeated badgood 2;where exp = 3;title '3 bugs only';run;
proc glm; model bbbgbd75 bbbggd75 = /nouni;repeated badgood 2;where exp = 3;title '3 bugs only';run;
proc glm; model bbftbd55 bbftgd55 = /nouni;repeated badgood 2;where exp = 3;title '3 fruit only';run;
proc glm; model bbftbd66 bbftgd66 = /nouni;repeated badgood 2;where exp = 3;title '3 fruit only';run;
proc glm; model bbftbd75 bbftgd75 = /nouni;repeated badgood 2;where exp = 3;title '3 fruit only';run;




/*proc print; var sub exp DbugAt55 DbugAt66 DbugAt75 AnmlTmpD relbugs bugfruit;
proc print; var sub exp DfrtAt55 DfrtAt66 DfrtAt75 FoodtmpD relfruit bugfruit;

proc print; var sub exp Dbgbd55 Dbggd55 Dftbd55 Dftgd55 Dbgbd66 Dbggd66;
proc print; var sub exp Dftbd66 Dftgd66 Dbgbd75 Dbggd75 Dftbd75 Dftgd75;run;*/
